﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cat.Domain.Entities;
using System.Linq.Expressions;

namespace Cat.Domain.Shared
{
    public interface IDataRepository<T> where T : BaseEntity
    {
        void Insert(T item);

        void Update(T item);

        void DeleteByKey(params object[] keyValues);

        void DeleteItem(T item);

        T SearchByKey(params object[] keyValues);

        IQueryable<T> Find(Expression<Func<T, bool>> criteria,
            params Expression<Func<T, object>>[] includeProperties);

        IQueryable<T> All(params Expression<Func<T, object>>[] includeProperties);

        void Save();
    }
}
